var tests = ["test_newsletter_sendToUser",
             "test_newsletter_receiverUser"];

var test_newsletter_sendToUser = function() {
	//user1
	var user1 = new User("dummy", "dummypw", "dummyfirst", "lastname", "", "", false, true, null, null);
	//club1
	var club1 = new Club("TC Hausmening", "tchausmening", null, root.currencies.get("EUR"), "Europe/Vienna", true, 0, 0, true);
	//newsletter
	newsletter = new Newsletter("subject", "body", user1, club1);
	club1.newsletters.add(newsletter);
	
	assertEqual("subject", newsletter.subject);
	assertEqual("body", newsletter.body);
	assertEqual(user1, newsletter.user);
	assertEqual(club1, newsletter.club);
	
	club1.newsletters.removeChild(newsletter);
}

var test_newsletter_receiverUser = function() {
	//user1
	var user1 = new User("dummy", "dummypw", "dummyfirst", "lastname", "", "", false, true, null, null);
	//club1
    var club1 = new Club("TC Hausmening", "tchausmening", null, root.currencies.get("EUR"), "Europe/Vienna", true, 0, 0 , true);
	//newsletter
	newsletter = new Newsletter("subject", "body", user1, club1);	
	//newsletterReceiver
	newsletterReceiver = new NewsletterReceiver(user1);
	newsletter.receivers.add(newsletterReceiver);
	
	assertEqual(user1, newsletterReceiver.user);
	
	newsletter.receivers.removeChild(newsletterReceiver);
}